
<!doctype html>
<html lang="en">
<head>
    <link>
    <meta charset="UTF-8">
    <script
            src="https://code.jquery.com/jquery-3.7.1.min.js"
            integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo="
            crossorigin="anonymous"></script>
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">

</head>
<body>
<div>
<!--    <form action="some.php" method="post" enctype="multipart/form-data">-->

        <input type="text" name="title" class="title"> <br>
        <textarea name="content" cols="30" rows="10" class="content"></textarea>
        <button type = "submit" class="button">Отправить</button>

<!--    </form>-->

<script>
    $(document).ready(function () {
       $('button.button').on('click', function (){
           var titleValue = $('input.title').val();
           var contentValue = $('textarea.content').val();

           $.ajax({
               method: "POST",
               url: "some.php",
               data: { title: titleValue, content: contentValue }
           })
               .done(function( msg ) {
                   // alert( "Data Saved: " + msg );
               });
         $('input.title').val('');
         $('textarea.content').val('');
       })
    });
</script>

</div>
</body>
</html>